#include <allegro.h>
#include <stdlib.h>


int main(void){

    int x,y,x1,x2,y1,y2,rx,ry;
    int red,green,blue,color;
    long n;

    srand(time(NULL));

    allegro_init();
    install_keyboard();

    int ret = set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,480,0,0);
    if(ret != 0){
        allegro_message(allegro_error);
        return 1;
    }

    textprintf_ex(screen,font,0,0,15,-1,"ElipseFill - %dx%d - press ESC to quit.", SCREEN_W, SCREEN_H);

    while(!key[KEY_ESC]){
        y = 10 + rand() % (SCREEN_H-20);
        x = 10 + rand() % (SCREEN_W-20);
        rx = rand() % 30;
        ry = rand() % 30;

        red = rand() % 255;
        green = rand() % 255;
        blue = rand() % 255;
        color = makecol(red,green,blue);

        ellipsefill(screen,x,y,rx,ry,color);

        rest(25);
    }
    allegro_exit();
    return 0;

}
END_OF_MAIN()
